package request

type Uri struct {
	Id uint `uri:"id" binding:"required,number" label:"分类ID"`
}

type Assort struct {
	Name string `form:"name" json:"name" binding:"required,max=20" label:"分类名称"`
	Sort uint8  `form:"sort" json:"sort" binding:"required,number" label:"排序"`
}

func (assort Assort) GetMessages() ValidatorMessages {
	return ValidatorMessages{
		"required": ":label为必填",
		"number":   ":label格式不正确",
		"max":      ":label字数超出限制",
	}
}
